package com.example.chat03.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.security.Principal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class StompAuthenticatedUser implements Principal {
    private String username;//用户名

    /**
     * 用于指定用户消息推送的标识
     */
    @Override
    public String getName() {
        return this.username;
    }
}
